<!-- 博客 - 页面布局 > 上中下 -->



<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=dark>
<!-- 博客 - 导航栏上方 -->


<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/blog/img/fluid.png">
  <link rel="icon" href="/blog/img/icon/dw.png">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="author" content="Memory">
  <meta name="keywords" content="">

  
    <meta name="description" content="🍛 熟练掌握git操作，尝试在GitHub中为开源项目作贡献">
<meta property="og:type" content="article">
<meta property="og:title" content="git&#x2F;GitHub进阶学习">
<meta property="og:url" content="https://test.atomgit.net/blog/2023/06/04/git-GitHub%E8%BF%9B%E9%98%B6%E5%AD%A6%E4%B9%A0/index.html">
<meta property="og:site_name" content="Memory&#39;s blog">
<meta property="og:description" content="🍛 熟练掌握git操作，尝试在GitHub中为开源项目作贡献">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://test.atomgit.net/blog/img/artical/girl9.jpg">
<meta property="article:published_time" content="2023-06-04T14:23:54.000Z">
<meta property="article:modified_time" content="2024-09-02T14:23:54.000Z">
<meta property="article:author" content="Memory">
<meta property="article:tag" content="git">
<meta property="article:tag" content="GitHUb">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="https://test.atomgit.net/blog/img/artical/girl9.jpg">
  
  
  
  <title>git/GitHub进阶学习 - Memory&#39;s blog</title>

  <link  rel="stylesheet" href="https://lib.baomitu.com/twitter-bootstrap/4.6.1/css/bootstrap.min.css" />



  <link  rel="stylesheet" href="https://lib.baomitu.com/github-markdown-css/4.0.0/github-markdown.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/hint.css/2.7.0/hint.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.css" />



<!-- 主题依赖的图标库，不要自行修改 -->
<!-- Do not modify the link that theme dependent icons -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_hj8rtnfg7um.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_lbnruvf0jn.css">


<link  rel="stylesheet" href="/blog/css/main.css" />


  <link id="highlight-css" rel="stylesheet" href="/blog/css/highlight.css" />
  
    <link id="highlight-css-dark" rel="stylesheet" href="/blog/css/highlight-dark.css" />
  



  
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.css">



  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    Fluid.ctx = Object.assign({}, Fluid.ctx)
    var CONFIG = {"hostname":"test.atomgit.net","root":"/blog/","version":"1.9.4","typing":{"enable":true,"typeSpeed":100,"cursorChar":"_","loop":false,"scope":[]},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"left","visible":"hover","icon":""},"progressbar":{"enable":true,"height_px":3,"color":"#29d","options":{"showSpinner":false,"trickleSpeed":100}},"code_language":{"enable":true,"default":"TEXT"},"copy_btn":true,"image_caption":{"enable":true},"image_zoom":{"enable":true,"img_url_replace":["",""]},"toc":{"enable":true,"placement":"right","headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":0},"lazyload":{"enable":false,"loading_img":"/img/loading.gif","onlypost":false,"offset_factor":2},"web_analytics":{"enable":true,"follow_dnt":true,"baidu":null,"google":null,"gtag":null,"tencent":{"sid":null,"cid":null},"woyaola":null,"cnzz":null,"leancloud":{"appId":"T1hUHH9Ks1ggG9DBE3HgUPpV-gzGzoHsz","appKey":"XFkgzzvzNo3J3uNCbBiSOFKc","server_url":"https://t1huhh9k.lc-cn-n1-shared.com","path":"window.location.pathname","ignore_local":false}},"search_path":"/blog/local-search.xml"};

    if (CONFIG.web_analytics.follow_dnt) {
      var dntVal = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
      Fluid.ctx.dnt = dntVal && (dntVal.startsWith('1') || dntVal.startsWith('yes') || dntVal.startsWith('on'));
    }
  </script>
  <script  src="/blog/js/utils.js" ></script>
  <script  src="/blog/js/color-schema.js" ></script>
  

  

  

  

  

  

  

  



  
<meta name="generator" content="Hexo 5.4.2"></head>

<body>
  

  <header>
    <!-- 博客 - 导航栏上方 -->


<div class="header-inner" style="height: 100vh">
  <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand" href="/blog/">
      <strong>Memory&#39;s blog</strong>
    </a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/blog/">
                <i class="iconfont icon-home-fill"></i>
                <span>首页</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/blog/archives/">
                <i class="iconfont icon-archive-fill"></i>
                <span>归档</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/blog/categories/">
                <i class="iconfont icon-category-fill"></i>
                <span>分类</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/blog/tags/">
                <i class="iconfont icon-tags-fill"></i>
                <span>标签</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/blog/about/">
                <i class="iconfont icon-user-fill"></i>
                <span>关于</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/blog/links/">
                <i class="iconfont icon-link-fill"></i>
                <span>友链</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/blog/playlist/">
                <i class="iconfont icon-music"></i>
                <span>音乐</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/blog/Memos/">
                <i class="iconfont icon-comment "></i>
                <span>说说</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/blog/App/">
                <i class="iconfont icon-mobile"></i>
                <span>咫尺</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item dropdown">
              <a class="nav-link dropdown-toggle" target="_self" href="javascript:;" role="button"
                 data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                <i class="iconfont icon-books"></i>
                <span>青简</span>
              </a>
              <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                
                  
                  
                  
                  <a class="dropdown-item" target="_blank" rel="noopener" href="http://47.93.135.62:5230/explore">
                    <i class="iconfont icon-images"></i>
                    <span>碎念微光</span>
                  </a>
                
                  
                  
                  
                  <a class="dropdown-item" href="/blog/New/">
                    <i class="iconfont icon-bug"></i>
                    <span>匠册详析</span>
                  </a>
                
                  
                  
                  
                  <a class="dropdown-item" href="/blog/New/">
                    <i class="iconfont icon-xbox-fill"></i>
                    <span>窗景新编</span>
                  </a>
                
                  
                  
                  
                  <a class="dropdown-item" href="/blog/New/">
                    <i class="iconfont icon-steam"></i>
                    <span>戏码幕后</span>
                  </a>
                
                  
                  
                  
                  <a class="dropdown-item" href="/blog/New/">
                    <i class="iconfont icon-map"></i>
                    <span>他山随拾</span>
                  </a>
                
              </div>
            </li>
          
        
        
            <li class="nav-item" id="search-btn">
                <a class="nav-link" target="_self" href="javascript:;" data-toggle="modal" data-target="#modalNotice" aria-label="Search">
                    <i class="iconfont icon-book"></i>
                    <span>公告</span>
                </a>
            </li>
            
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" target="_self" href="javascript:;" data-toggle="modal" data-target="#modalSearch" aria-label="Search">
              <i class="iconfont icon-search"></i>
            </a>
          </li>
          
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" target="_self" href="javascript:;" aria-label="Color Toggle">
              <i class="iconfont icon-dark" id="color-toggle-icon"></i>
            </a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>
 
<div id="banner" class="banner" parallax=true
     style="background: url('/blog/img/artical/girl9.jpg') no-repeat center center; background-size: cover;">
  <div class="full-bg-img">

    <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
      <div class="banner-text text-center fade-in-up">

        <div class="h2">
          
            <span id="subtitle" data-typed-text="git/GitHub进阶学习"></span>
          
        </div>


        
          <!-- 文章页面 - 顶部信息 -->

<div class="mt-3">
  
  <span class="post-meta mr-2">
    <i class="iconfont icon-author" aria-hidden="true"></i>
    Memory
  </span>
   
  <span class="post-meta">
    <i class="iconfont icon-date-fill" aria-hidden="true"></i>
    <time datetime="2023-06-04 22:23" pubdate>
      2023年6月4日 晚上
    </time>
  </span>
  
</div>

<div class="mt-1">
  
  <span class="post-meta mr-2">
    <i class="iconfont icon-chart"></i>
     6.1k 字 
  </span>
   
  <span class="post-meta mr-2">
    <i class="iconfont icon-clock-fill"></i>
       16 分钟 
  </span>
     
  <span
    id="leancloud-page-views-container"
    class="post-meta"
    style="display: none"
  >
    <i class="iconfont icon-eye" aria-hidden="true"></i>
    <span id="leancloud-page-views"></span> 次
  </span>

    
</div>


        

        <!-- 添加网站运行时间 -->
        <div class="footer-content" style="background-color: transparent;">
          <div>
            <span id="timeDate"></span>
            <span id="times"></span>
            <script>
            var now = new Date();
            function createtime(){
                var grt= new Date("03/07/2023 00:00:00");//此处修改你的建站时间或者网站上线时间
                now.setTime(now.getTime()+250);
                days = (now - grt ) / 1000 / 60 / 60 / 24;
                dnum = Math.floor(days);
                hours = (now - grt ) / 1000 / 60 / 60 - (24 * dnum);
                hnum = Math.floor(hours);
                if(String(hnum).length ==1 ){
                    hnum = "0" + hnum;
                }
                minutes = (now - grt ) / 1000 /60 - (24 * 60 * dnum) - (60 * hnum);
                mnum = Math.floor(minutes);
                if(String(mnum).length ==1 ){
                          mnum = "0" + mnum;
                }
                seconds = (now - grt ) / 1000 - (24 * 60 * 60 * dnum) - (60 * 60 * hnum) - (60 * mnum);
                snum = Math.round(seconds);
                if(String(snum).length ==1 ){
                          snum = "0" + snum;
                }
                document.getElementById("timeDate").innerHTML = "🚀 &nbsp"+dnum+"&nbsp天";  //此次自定义显示内容
                document.getElementById("times").innerHTML = hnum + "&nbsp小时&nbsp" + mnum + "&nbsp分&nbsp" + snum + "&nbsp秒";
            }  

            if (!window.location.href.includes('/20')) {  
            setInterval("createtime()", 250);  // 只有当URL不包含'specific-page'时，才调用createtime  
            }//此次自定义显示内容
            </script>
          </div>
        </div>

      </div>
      
        <div class="scroll-down-bar">
          <i class="iconfont icon-arrowdown"></i>
        </div>
      
    </div>
  </div>
</div>

</div>

  </header>

  <main>
    
      <!-- 文章页  -->


<div class="container-fluid nopadding-x">

  <div class="row nomargin-x">
    <div class="side-col d-none d-lg-block col-lg-2">
      
  <aside class="sidebar category-bar" style="margin-right: -1rem">
    <!-- 文章页面 - 左边栏所属分类 -->
  

<!-- 文章页 - 文章分类 -->





<div class="category-list">
  
  
    
    
    
    <div class="category row nomargin-x">
      <a class="category-item 
          list-group-item category-item-action col-10 col-md-11 col-xm-11" title="工善其事"
        id="heading-8e5817ac946e4b1573b7deec56ca2efc" role="tab" data-toggle="collapse" href="#collapse-8e5817ac946e4b1573b7deec56ca2efc"
        aria-expanded="true"
      >
        工善其事
        <span class="list-group-count">(13)</span>
        <i class="iconfont icon-arrowright"></i>
      </a>
      
      <div class="category-collapse collapse show" id="collapse-8e5817ac946e4b1573b7deec56ca2efc"
           role="tabpanel" aria-labelledby="heading-8e5817ac946e4b1573b7deec56ca2efc">
        
        
          
  <div class="category-post-list">
    
    
      
      
        <a href="/blog/2023/03/07/hello-world/" title="Hello World"
           class="list-group-item list-group-item-action
           ">
          <span class="category-post">Hello World</span>
        </a>
      
    
      
      
        <a href="/blog/2023/03/15/%E6%B5%8B%E8%AF%95%E6%96%87%E6%A1%A3%EF%BC%9A%E5%8D%9A%E5%AE%A2%E5%88%9D%E4%BD%93%E9%AA%8C/" title="测试文档：博客初体验"
           class="list-group-item list-group-item-action
           ">
          <span class="category-post">测试文档：博客初体验</span>
        </a>
      
    
      
      
        <a href="/blog/2023/03/17/%E5%85%A5%E9%97%A8%E6%8C%87%E5%8D%97%EF%BC%9A%E6%8E%8C%E6%8F%A1Git%E7%9A%84%E5%9F%BA%E6%9C%AC%E6%93%8D%E4%BD%9C%E5%8F%8A%E8%BF%9B%E9%98%B6%E5%AD%A6%E4%B9%A0/" title="入门指南：掌握Git的基本操作及进阶学习"
           class="list-group-item list-group-item-action
           ">
          <span class="category-post">入门指南：掌握Git的基本操作及进阶学习</span>
        </a>
      
    
      
      
        <a href="/blog/2023/03/19/%E6%B8%B8%E6%88%8F%E6%89%93%E5%8C%85/" title="游戏打包"
           class="list-group-item list-group-item-action
           ">
          <span class="category-post">游戏打包</span>
        </a>
      
    
      
      
        <a href="/blog/2023/06/04/git-GitHub%E8%BF%9B%E9%98%B6%E5%AD%A6%E4%B9%A0/" title="git/GitHub进阶学习"
           class="list-group-item list-group-item-action
           active">
          <span class="category-post">git/GitHub进阶学习</span>
        </a>
      
    
      
      
        <a href="/blog/2023/06/07/%E6%B3%A8%E5%86%8C%E8%A1%A8%E4%B8%AD%E6%93%8D%E4%BD%9C%E5%8F%B3%E9%94%AE%E8%8F%9C%E5%8D%95/" title="注册表中操作右键菜单"
           class="list-group-item list-group-item-action
           ">
          <span class="category-post">注册表中操作右键菜单</span>
        </a>
      
    
      
      
        <a href="/blog/2023/06/20/Typora%E6%93%8D%E4%BD%9C%E6%8A%80%E5%B7%A7/" title="美轮美奂的文档艺术：Typora的使用技巧和实践"
           class="list-group-item list-group-item-action
           ">
          <span class="category-post">美轮美奂的文档艺术：Typora的使用技巧和实践</span>
        </a>
      
    
      
      
        <a href="/blog/2023/06/22/AI%20%E5%AE%9E%E8%B7%B5%E4%B8%AD%E7%9A%84%E6%B4%9E%E8%A7%81%EF%BC%9A%E6%88%91%E7%9A%84%20AI%20%E4%B9%8B%E6%97%85/" title="AI实践中的洞见：我的AI之旅"
           class="list-group-item list-group-item-action
           ">
          <span class="category-post">AI实践中的洞见：我的AI之旅</span>
        </a>
      
    
      
      
        <a href="/blog/2023/06/24/%E9%85%8D%E7%BD%AE%E6%8C%87%E5%8D%97-%E6%8E%8C%E6%8F%A1Node-js%E9%85%8D%E7%BD%AE/" title="配置指南-掌握Node.js配置"
           class="list-group-item list-group-item-action
           ">
          <span class="category-post">配置指南-掌握Node.js配置</span>
        </a>
      
    
      
      
        <a href="/blog/2023/07/02/%E7%90%86%E8%A7%A3npm%E3%80%81pnpm%E5%92%8Cyarn%EF%BC%9A%E9%80%89%E5%87%BA%E6%9C%80%E9%80%82%E5%90%88%E4%BD%A0%E7%9A%84%E5%8C%85%E7%AE%A1%E7%90%86%E5%99%A8/" title="理解npm、pnpm和yarn：选出最适合你的包管理器"
           class="list-group-item list-group-item-action
           ">
          <span class="category-post">理解npm、pnpm和yarn：选出最适合你的包管理器</span>
        </a>
      
    
      
      
        <a href="/blog/categories/%E5%B7%A5%E5%96%84%E5%85%B6%E4%BA%8B/" class="list-group-item list-group-item-action">
          <span class="category-post">More...</span>
        </a>
        
  </div>

        
      </div>
    </div>
  
</div>

  </aside>


    </div>

    <div class="col-lg-8 nopadding-x-md">
      <div class="container nopadding-x-md" id="board-ctn">
        <div id="board">
          <article class="post-content mx-auto">
            <!-- SEO header -->
            <h1 style="display: none">git/GitHub进阶学习</h1>
            
              <p class="note note-success">
                
                  
                    本文最后更新于：1 年前
                  
                
              </p>
            
            
              <div class="markdown-body">
                
                <h1 id="git-GitHub-进阶学习"><a href="#git-GitHub-进阶学习" class="headerlink" title="git/GitHub 进阶学习"></a>git/GitHub 进阶学习</h1><ul>
<li><h5 id="第一次学习-git-还是过年前后做瑞吉外卖时学的，也总结过-Git-基础的笔记"><a href="#第一次学习-git-还是过年前后做瑞吉外卖时学的，也总结过-Git-基础的笔记" class="headerlink" title="第一次学习 git 还是过年前后做瑞吉外卖时学的，也总结过 Git 基础的笔记"></a>第一次学习 git 还是过年前后做瑞吉外卖时学的，也总结过 Git 基础的笔记</h5></li>
<li><h5 id="后来做用户中心、伙伴匹配等项目时也学会了将本地代码提交至-Gitee-GitHub-的远程仓库，但对-git-的使用也仅限于此"><a href="#后来做用户中心、伙伴匹配等项目时也学会了将本地代码提交至-Gitee-GitHub-的远程仓库，但对-git-的使用也仅限于此" class="headerlink" title="后来做用户中心、伙伴匹配等项目时也学会了将本地代码提交至 Gitee/GitHub 的远程仓库，但对 git 的使用也仅限于此"></a>后来做用户中心、伙伴匹配等项目时也学会了将本地代码提交至 Gitee/GitHub 的远程仓库，但对 git 的使用也仅限于此</h5></li>
<li><h5 id="昨天跟着鱼皮兄学到了在-GitHub-上如何优雅地在线查看别人项目的代码甚至在线运行，激起了我要持续学习-GitHub-的兴趣"><a href="#昨天跟着鱼皮兄学到了在-GitHub-上如何优雅地在线查看别人项目的代码甚至在线运行，激起了我要持续学习-GitHub-的兴趣" class="headerlink" title="昨天跟着鱼皮兄学到了在 GitHub 上如何优雅地在线查看别人项目的代码甚至在线运行，激起了我要持续学习 GitHub 的兴趣"></a>昨天跟着鱼皮兄学到了在 GitHub 上如何优雅地在线查看别人项目的代码甚至在线运行，激起了我要持续学习 GitHub 的兴趣</h5></li>
<li><h5 id="今天康文昌的-git-GitHub-教学，简直是醍醐灌顶，有感而发，在此记录："><a href="#今天康文昌的-git-GitHub-教学，简直是醍醐灌顶，有感而发，在此记录：" class="headerlink" title="今天康文昌的 git/GitHub 教学，简直是醍醐灌顶，有感而发，在此记录："></a>今天康文昌的 git/GitHub 教学，简直是醍醐灌顶，有感而发，在此记录：</h5></li>
</ul>
<h2 id="提交历史"><a href="#提交历史" class="headerlink" title="提交历史"></a>提交历史</h2><blockquote>
<p>2024 年 8 月 28 日</p>
</blockquote>
<p><a target="_blank" rel="noopener" href="https://blog.csdn.net/hll1024/article/details/139122907">idea 拉取项目报错:master has no tracked branch 或 master 没有跟踪的分支-CSDN 博客</a></p>
<p>[Git 版本控制常见问题记录_git 代码版本控制的问题-CSDN 博客](<a target="_blank" rel="noopener" href="https://blog.csdn.net/HTxinghai/article/details/135867596?ops_request_misc=%7B%22request_id%22:%220E0816F9-79A7-4088-86B5-1B1159ACA63B%22,%22scm%22:%2220140713.130102334.pc_all.%22%7D&amp;request_id=0E0816F9-79A7-4088-86B5-1B1159ACA63B&amp;biz_id=0&amp;utm_medium=distribute.pc_search_result.none-task-blog-2~all~first_rank_ecpm_v1~rank_v31_ecpm-2-135867596-null-null.142%5Ev100%5Epc_search_result_base4&amp;utm_term=git">https://blog.csdn.net/HTxinghai/article/details/135867596?ops_request_misc=%7B%22request%5Fid%22%3A%220E0816F9-79A7-4088-86B5-1B1159ACA63B%22%2C%22scm%22%3A%2220140713.130102334.pc%5Fall.%22%7D&amp;request_id=0E0816F9-79A7-4088-86B5-1B1159ACA63B&amp;biz_id=0&amp;utm_medium=distribute.pc_search_result.none-task-blog-2~all~first_rank_ecpm_v1~rank_v31_ecpm-2-135867596-null-null.142^v100^pc_search_result_base4&amp;utm_term=git</a> 协同常见报错&amp;spm=1018.2226.3001.4187)</p>
<p>[Merge 还是 Rebase？这次终于懂了-CSDN 博客](<a target="_blank" rel="noopener" href="https://blog.csdn.net/qq_47831505/article/details/135433009?ops_request_misc=%7B%22request_id%22:%2231FEFAD6-5FD2-4246-BFE0-9C017ABAFA8C%22,%22scm%22:%2220140713.130102334..%22%7D&amp;request_id=31FEFAD6-5FD2-4246-BFE0-9C017ABAFA8C&amp;biz_id=0&amp;utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-1-135433009-null-null.142%5Ev100%5Epc_search_result_base4&amp;utm_term=merge">https://blog.csdn.net/qq_47831505/article/details/135433009?ops_request_misc=%7B%22request%5Fid%22%3A%2231FEFAD6-5FD2-4246-BFE0-9C017ABAFA8C%22%2C%22scm%22%3A%2220140713.130102334..%22%7D&amp;request_id=31FEFAD6-5FD2-4246-BFE0-9C017ABAFA8C&amp;biz_id=0&amp;utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-1-135433009-null-null.142^v100^pc_search_result_base4&amp;utm_term=merge</a> rebase&amp;spm=1018.2226.3001.4187)</p>
<p><a target="_blank" rel="noopener" href="https://blog.csdn.net/m0_57236802/article/details/134148866">fatal: refusing to merge unrelated histories-CSDN 博客</a></p>
<p>原因: 远程和本地两个仓库的历史记录不相关 ,Git 默认不允许这样的操作 （例如:你的新仓库是全新的，没有任何提交历史）, 因为它可能会导致文件冲突或其问题。</p>
<p>解决方法:分两步完成同时在 idea 中终端当中进行操作</p>
<p>1.这个命令会将远程仓库 origin 的 master 分支的内容拉取到当前分支。</p>
<figure class="highlight crmsh"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs crmsh">git pull origin <span class="hljs-keyword">master</span> <span class="hljs-title">--allow-unrelated-histories</span><br></code></pre></td></tr></table></figure>

<p>2.使用本地 master 分支来设置跟踪远程的 master 分支</p>
<figure class="highlight crmsh"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs crmsh">git branch --<span class="hljs-attr">set-upstream-to=</span>origin/<span class="hljs-keyword">master</span> <span class="hljs-title">master</span><br></code></pre></td></tr></table></figure>

<p><a target="_blank" rel="noopener" href="https://blog.csdn.net/weixin_48575553/article/details/121496614">git update 时出现 Before update your uncommitted changes were saved to shelf. 在更新之前，未提交的变更已保存到 shelf。-CSDN 博客</a></p>
<p><a target="_blank" rel="noopener" href="https://blog.csdn.net/hehyyoulan/article/details/80111488/">git 使用 IDEA 工具更新代码，导致未提交代码被覆盖解决办法_local changes were not restored before update your-CSDN 博客</a></p>
<p><img src="http://blog.memory-life.xyz/image-20240828194819551.png" alt="image-20240828194819551"></p>
<h2 id="冲突"><a href="#冲突" class="headerlink" title="冲突"></a>冲突</h2><blockquote>
<p>2024 年 8 月 29 日</p>
</blockquote>
<p>当你在执行 <code>git pull origin master --allow-unrelated-histories</code> 命令时遇到了一个错误，这主要是因为 Git 检测到你的本地分支上有一些文件（如 <code>.gitignore</code>、<code>.mvn/wrapper/maven-wrapper.properties</code>、<code>mvnw</code> 和 <code>mvnw.cmd</code>）已经被修改，而这些修改与远程分支（<code>origin/master</code>）上的相应文件存在冲突，导致合并操作无法直接进行。</p>
<p>为了解决这个问题，你有几个选项：</p>
<ol>
<li><p><strong>提交你的本地更改</strong>：<br>如果你确实想要保留这些本地更改，并且认为它们应该被包含在项目中，你可以先提交这些更改到你的本地分支，然后再尝试合并。</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><code class="hljs bash">git add .gitignore .mvn/wrapper/maven-wrapper.properties mvnw mvnw.cmd<br>git commit -m <span class="hljs-string">&quot;Commit local changes before pull&quot;</span><br>git pull origin master --allow-unrelated-histories<br></code></pre></td></tr></table></figure>

<p>注意，如果远程分支上的这些文件也有更新，你可能会遇到合并冲突，需要手动解决。</p>
</li>
<li><p><strong>撤销本地更改</strong>：<br>如果你不想保留这些本地更改，可以撤销它们，然后再进行合并。</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs bash">git checkout -- .gitignore .mvn/wrapper/maven-wrapper.properties mvnw mvnw.cmd<br>git pull origin master --allow-unrelated-histories<br></code></pre></td></tr></table></figure>

<p>这个命令会将这些文件恢复到最近一次提交的状态。</p>
</li>
<li><p><strong>使用 stash</strong>：<br>如果你暂时想保存这些更改，但又想先合并远程分支的更改，可以使用 <code>git stash</code>。</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><code class="hljs bash">git stash<br>git pull origin master --allow-unrelated-histories<br>git stash pop<br></code></pre></td></tr></table></figure>

<p><code>git stash</code> 会将你的工作区更改保存到一个临时的栈中，然后你可以安全地执行合并操作。合并完成后，使用 <code>git stash pop</code> 来恢复你的更改。如果合并后你的更改与新的代码存在冲突，你可能需要手动解决这些冲突。</p>
</li>
<li><p><strong>检查 <code>.gitignore</code> 是否需要更新</strong>：<br>如果你正在修改的 <code>.gitignore</code> 文件是为了添加或删除某些不需要被 Git 跟踪的文件，那么你应该考虑是否需要在合并远程更改之前更新这个文件。如果远程分支上的 <code>.gitignore</code> 文件已经包含了你的更改，你可能就不需要再修改它了。</p>
</li>
</ol>
<p>选择哪种方法取决于你的具体需求和当前的工作流程。如果你是在准备面试或提交简历的过程中遇到这个问题，确保你的工作区是干净的，以避免在面试过程中遇到意外的 Git 问题。</p>
<h2 id="gitignore-冲突"><a href="#gitignore-冲突" class="headerlink" title=".gitignore 冲突"></a>.gitignore 冲突</h2><blockquote>
<p>2024 年 9 月 2 日</p>
</blockquote>
<p><a target="_blank" rel="noopener" href="https://blog.csdn.net/Dontla/article/details/131936999">gitignore 文件使用方法（gitignore 教程）（git status –ignored）（git check-ignore -v ＜ file ＞）-CSDN 博客</a></p>
<p><a target="_blank" rel="noopener" href="https://blog.csdn.net/qq_31594665/article/details/141506157">.gitignore 文件不起作用，解决方法_.gitignore 不生效-CSDN 博客</a></p>
<p><a target="_blank" rel="noopener" href="https://blog.csdn.net/a1564a/article/details/130829731">maven 项目的 gitignore 文件自动生成在.idea 文件中 并且没有自动配置_idea 不会自动生成 gitignore-CSDN 博客</a></p>
<p><img src="http://blog.memory-life.xyz/image-20240902173116787.png" alt="image-20240902173116787"></p>
<p>17:23:59.488: [hawthorn-monitor-backend] git -c core.quotepath=false -c log.showSignature=false merge origin/cy error: Your local changes to the following files would be overwritten by merge: .gitignore Please commit your changes or stash them before you merge. Aborting Merge with strategy ort failed.</p>
<p>这个错误信息表明你在尝试合并 <code>origin/cy</code> 分支到你的当前分支时遇到了问题，因为 <code>.gitignore</code> 文件在你的本地有修改，而这些修改会与合并操作冲突。Git 不允许合并操作覆盖你的本地更改，所以合并被中止了。</p>
<p>为了解决这个问题，你有几个选项：</p>
<ol>
<li><p><strong>提交你的更改</strong>：<br>如果你认为 <code>.gitignore</code> 文件中的更改是重要的，并且你希望保留这些更改，你可以先将它们提交到你的当前分支。</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs bash">git add .gitignore<br>git commit -m <span class="hljs-string">&quot;Update .gitignore&quot;</span><br></code></pre></td></tr></table></figure>

<p>然后再尝试合并：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><code class="hljs bash">bash复制代码<br><br>git merge origin/cy<br></code></pre></td></tr></table></figure></li>
<li><p><strong>储藏你的更改</strong>（Stashing）：<br>如果你现在不想提交这些更改，但是想先合并分支，你可以使用 <code>git stash</code> 命令来储藏这些更改。这会将你的工作目录和暂存区的更改保存起来，然后你可以安全地合并分支。合并完成后，你可以使用 <code>git stash pop</code> 来恢复你的更改。</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><code class="hljs bash">git stash<br>git merge origin/cy<br>git stash pop<br></code></pre></td></tr></table></figure></li>
<li><p><strong>检查 <code>.gitignore</code> 文件</strong>：<br>在合并之前，检查 <code>.gitignore</code> 文件中的更改是否确实需要。有时候，一些临时的或不必要的更改可能会被错误地添加进去。如果是这样，你可以简单地撤销这些更改，然后再进行合并。</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs bash">git checkout -- .gitignore<br>git merge origin/cy<br></code></pre></td></tr></table></figure></li>
</ol>
<p>选择哪种方法取决于你的具体情况和偏好。如果你不确定，可以先提交你的更改，这样你就可以在合并后更容易地跟踪和管理你的代码变更。</p>
<h2 id="本地-git-的基本操作"><a href="#本地-git-的基本操作" class="headerlink" title="本地 git 的基本操作"></a>本地 git 的基本操作</h2><ul>
<li><h5 id="以下操作均可在-VS-Code-中操作（已集成-git-基础命令）"><a href="#以下操作均可在-VS-Code-中操作（已集成-git-基础命令）" class="headerlink" title="以下操作均可在 VS Code 中操作（已集成 git 基础命令）"></a>以下操作均可在 VS Code 中操作（已集成 git 基础命令）</h5></li>
<li><h5 id="初始化用户和邮箱"><a href="#初始化用户和邮箱" class="headerlink" title="初始化用户和邮箱"></a>初始化用户和邮箱</h5></li>
</ul>
<figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs c">git config --global user.name <span class="hljs-string">&quot;用户名&quot;</span><br>git config --global user.email <span class="hljs-string">&quot;用户邮箱&quot;</span><br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="本地初始化一个仓库"><a href="#本地初始化一个仓库" class="headerlink" title="本地初始化一个仓库"></a>本地初始化一个仓库</h5></li>
</ul>
<figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs c">git init<br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="将文件修改添加至暂存区"><a href="#将文件修改添加至暂存区" class="headerlink" title="将文件修改添加至暂存区"></a>将文件修改添加至暂存区</h5></li>
</ul>
<figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs c">git add .c<br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="提交暂存区内的修改记录"><a href="#提交暂存区内的修改记录" class="headerlink" title="提交暂存区内的修改记录"></a>提交暂存区内的修改记录</h5></li>
</ul>
<figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs c">git commit -m <span class="hljs-string">&quot;fix(member):memory&quot;</span><br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="查看提交记录"><a href="#查看提交记录" class="headerlink" title="查看提交记录"></a>查看提交记录</h5></li>
</ul>
<figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs c">git <span class="hljs-built_in">log</span><br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="硬回退至某一次提交版本"><a href="#硬回退至某一次提交版本" class="headerlink" title="硬回退至某一次提交版本"></a>硬回退至某一次提交版本</h5></li>
</ul>
<figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs c">git reset --hard 提交记录id<br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="创建分支"><a href="#创建分支" class="headerlink" title="创建分支"></a>创建分支</h5></li>
</ul>
<figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs c">git branch 分支名<br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="选择分支"><a href="#选择分支" class="headerlink" title="选择分支"></a>选择分支</h5></li>
</ul>
<figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs c">git checkout 分支名<br></code></pre></td></tr></table></figure>

<h2 id="git-链接远程仓库"><a href="#git-链接远程仓库" class="headerlink" title="git 链接远程仓库"></a>git 链接远程仓库</h2><ul>
<li><h5 id="注册并登录-GitHub-就不多说了，新建一个仓库-test"><a href="#注册并登录-GitHub-就不多说了，新建一个仓库-test" class="headerlink" title="注册并登录 GitHub 就不多说了，新建一个仓库 test"></a>注册并登录 GitHub 就不多说了，新建一个仓库 test</h5></li>
<li><h5 id="链接至远程仓库（注：origin-仅为仓库名，可自定义）"><a href="#链接至远程仓库（注：origin-仅为仓库名，可自定义）" class="headerlink" title="链接至远程仓库（注：origin 仅为仓库名，可自定义）"></a>链接至远程仓库（注：origin 仅为仓库名，可自定义）</h5></li>
</ul>
<figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs c">git remote add origin 仓库地址<br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="设置主分支（默认分支）"><a href="#设置主分支（默认分支）" class="headerlink" title="设置主分支（默认分支）"></a>设置主分支（默认分支）</h5></li>
</ul>
<figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs c">git branch -M main<br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="执行更新，并提交至远程仓库"><a href="#执行更新，并提交至远程仓库" class="headerlink" title="执行更新，并提交至远程仓库"></a>执行更新，并提交至远程仓库</h5></li>
</ul>
<figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><code class="hljs c">git add .<br>git commit -m <span class="hljs-string">&quot;fix(member):memory&quot;</span><br>git push origin<br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="注：这里可能会出现以下几个问题："><a href="#注：这里可能会出现以下几个问题：" class="headerlink" title="注：这里可能会出现以下几个问题："></a>注：这里可能会出现以下几个问题：</h5></li>
</ul>
<figure class="highlight livecodeserver"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><code class="hljs livecodeserver">问题一：<br>————————————————<br>warning: HTTPS connections may <span class="hljs-keyword">not</span> be secure. See <span class="hljs-keyword">https</span>://aka.ms/gcm/tlsverify <span class="hljs-keyword">for</span> more information.<br>To <span class="hljs-keyword">https</span>://github.com/deng<span class="hljs-number">-2022</span>/test.git<br> ! [rejected]        main -&gt; main (fetch <span class="hljs-keyword">first</span>)<br>error: failed <span class="hljs-built_in">to</span> push some refs <span class="hljs-built_in">to</span> <span class="hljs-string">&#x27;https://github.com/deng-2022/test.git&#x27;</span><br>hint: Updates were rejected because <span class="hljs-keyword">the</span> remote <span class="hljs-keyword">contains</span> work that you <span class="hljs-built_in">do</span><br>hint: <span class="hljs-keyword">not</span> have locally. This is usually caused <span class="hljs-keyword">by</span> another repository pushing<br>hint: <span class="hljs-built_in">to</span> <span class="hljs-keyword">the</span> same ref. You may want <span class="hljs-built_in">to</span> <span class="hljs-keyword">first</span> integrate <span class="hljs-keyword">the</span> remote changes<br>hint: (e.g., <span class="hljs-string">&#x27;git pull ...&#x27;</span>) <span class="hljs-keyword">before</span> pushing again.<br>hint: See <span class="hljs-keyword">the</span> <span class="hljs-string">&#x27;Note about fast-forwards&#x27;</span> <span class="hljs-keyword">in</span> <span class="hljs-string">&#x27;git push --help&#x27;</span> <span class="hljs-keyword">for</span> details.<br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="总结原因以及解决办法如下："><a href="#总结原因以及解决办法如下：" class="headerlink" title="总结原因以及解决办法如下："></a>总结原因以及解决办法如下：</h5></li>
</ul>
<figure class="highlight markdown"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><code class="hljs markdown">报错的原因是因为，每个仓库都有一个分支，也可以理解为大仓库里的小仓库，我们只是跟线上远程仓库有了关联，但没有跟线上远程仓库的某个分支关联，所以我们没法提交<br><br>在终端输入 git pull --rebase origin master 即可跟刚创建的线上远程仓库的默认分支 master 关联<br>这时再执行一下 git push -u origin master 即可将我们的项目文件上传到关联的线上远程文件中<br>————————————————<br>原文链接：https://blog.csdn.net/weixin<span class="hljs-emphasis">_52641692/article/details/130230537</span><br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="关联线上远程仓库默认分支"><a href="#关联线上远程仓库默认分支" class="headerlink" title="关联线上远程仓库默认分支"></a>关联线上远程仓库默认分支</h5></li>
</ul>
<figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs c">git pull --rebase origin main<br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="提交项目文件至相关联的远程仓库分支中"><a href="#提交项目文件至相关联的远程仓库分支中" class="headerlink" title="提交项目文件至相关联的远程仓库分支中"></a>提交项目文件至相关联的远程仓库分支中</h5></li>
</ul>
<figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs c">git push -u origin main<br></code></pre></td></tr></table></figure>

<figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><code class="hljs">问题二：<br>————————————————<br>这个我目前没遇到过，但问题描述是SSL证书过期之类的，总之就是本地的SSL证书有问题<br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="执行以下命令即可："><a href="#执行以下命令即可：" class="headerlink" title="执行以下命令即可："></a>执行以下命令即可：</h5></li>
</ul>
<figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs c">git config --global http.sslverify <span class="hljs-literal">false</span><br></code></pre></td></tr></table></figure>

<p><a target="_blank" rel="noopener" href="https://blog.csdn.net/weixin_47872288/article/details/124948490">Git 出现 FETCH_HEAD fatal: refusing to merge unrelated histories 解决方法-CSDN 博客</a></p>
<figure class="highlight crmsh"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs crmsh">git pull origin <span class="hljs-keyword">master</span> <span class="hljs-title">--allow-unrelated-histories</span><br></code></pre></td></tr></table></figure>

<h3 id="参与-GitHub-开源项目"><a href="#参与-GitHub-开源项目" class="headerlink" title="参与 GitHub 开源项目"></a>参与 GitHub 开源项目</h3><ul>
<li><h5 id="这个我在此简述一下吧，操作的多了就会熟练的："><a href="#这个我在此简述一下吧，操作的多了就会熟练的：" class="headerlink" title="这个我在此简述一下吧，操作的多了就会熟练的："></a>这个我在此简述一下吧，操作的多了就会熟练的：</h5></li>
<li><h5 id="在开源项目中点击点击-Fork，把项目拉取到自己的仓库中，执行修改并提交至自己的远程仓库分支中，再远程链接到开源项目仓库地址，回到开源项目中点击-Pull-requests-gt-new-pull-request-gt-compare-across-forks，选择自己对应的仓库分支，create-pull-request-即可提交修改，恭喜你，已经完成了第一次向开源项目贡献代码"><a href="#在开源项目中点击点击-Fork，把项目拉取到自己的仓库中，执行修改并提交至自己的远程仓库分支中，再远程链接到开源项目仓库地址，回到开源项目中点击-Pull-requests-gt-new-pull-request-gt-compare-across-forks，选择自己对应的仓库分支，create-pull-request-即可提交修改，恭喜你，已经完成了第一次向开源项目贡献代码" class="headerlink" title="在开源项目中点击点击 Fork，把项目拉取到自己的仓库中，执行修改并提交至自己的远程仓库分支中，再远程链接到开源项目仓库地址，回到开源项目中点击 Pull requests -&gt; new pull request -&gt; compare across forks，选择自己对应的仓库分支，create pull request 即可提交修改，恭喜你，已经完成了第一次向开源项目贡献代码"></a>在开源项目中点击点击 Fork，把项目拉取到自己的仓库中，执行修改并提交至自己的远程仓库分支中，再远程链接到开源项目仓库地址，回到开源项目中点击 Pull requests -&gt; new pull request -&gt; compare across forks，选择自己对应的仓库分支，create pull request 即可提交修改，恭喜你，已经完成了第一次向开源项目贡献代码</h5></li>
</ul>
<figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><code class="hljs c">git clone https:<span class="hljs-comment">//github.com/deng-2022/re01.git .</span><br>git remote add upstream https:<span class="hljs-comment">//github.com/midorg-com/re01.git</span><br>git checkout -b memory<br>git add .<br>git commit -m <span class="hljs-string">&quot;add(momber): memory&quot;</span><br>git push -u origin memory<br></code></pre></td></tr></table></figure>

                
              </div>
            
            <hr/>
            <div>
              <!-- 文章页面 - 底部标签 -->
<div class="post-metas my-3">
  
  <div class="post-meta mr-3 d-flex align-items-center">
    <i class="iconfont icon-category"></i>
    <!-- 归档页 - 文章列表 -->


<span class="category-chains">
  
  
    
      <span class="category-chain">
        
  <a href="/blog/categories/%E5%B7%A5%E5%96%84%E5%85%B6%E4%BA%8B/" class="category-chain-item">工善其事</a>
  
  

      </span>
    
  
</span>

  </div>
   
  <div class="post-meta">
    <i class="iconfont icon-tags"></i>
    
    <a href="/blog/tags/git/">#git</a>
    
    <a href="/blog/tags/GitHUb/">#GitHUb</a>
    
  </div>
  
</div>


              <!-- 文章页面 - 底部标签下方 -->

  
  <div class="license-box my-3">
    <div class="license-title">
      <div>git/GitHub进阶学习</div>
      <div>https://test.atomgit.net/blog/2023/06/04/git-GitHub进阶学习/</div>
    </div>
    <div class="license-meta">
      
        <div class="license-meta-item">
          <div>作者</div>
          <div>Memory</div>
        </div>
      
      
        <div class="license-meta-item license-meta-date">
          <div>发布于</div>
          <div>2023年6月4日</div>
        </div>
      
      
        <div class="license-meta-item license-meta-date">
          <div>更新于</div>
          <div>2024年9月2日</div>
        </div>
      
      
        <div class="license-meta-item">
          <div>许可协议</div>
          <div>
            
              
              
                <a target="_blank" href="https://creativecommons.org/licenses/by/4.0/">
                  <span class="hint--top hint--rounded" aria-label="BY - 署名">
                    <i class="iconfont icon-by"></i>
                  </span>
                </a>
              
            
          </div>
        </div>
      
    </div>
    <div class="license-icon iconfont"></div>
  </div>



              
                <div class="post-prevnext my-3">
                  <article class="post-prev col-6">
                    
                    
                      <a href="/blog/2023/06/07/%E6%B3%A8%E5%86%8C%E8%A1%A8%E4%B8%AD%E6%93%8D%E4%BD%9C%E5%8F%B3%E9%94%AE%E8%8F%9C%E5%8D%95/" title="注册表中操作右键菜单">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">注册表中操作右键菜单</span>
                        <span class="visible-mobile">上一篇</span>
                      </a>
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/blog/2023/06/04/%E6%8F%AD%E7%A7%98%E9%A1%B9%E7%9B%AE%E9%83%A8%E7%BD%B2%E4%B8%8A%E7%BA%BF%E4%B9%8B%E8%B7%AF%EF%BC%9A%E6%B5%81%E7%A8%8B%E3%80%81%E6%8C%91%E6%88%98%E4%B8%8E%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88/" title="稳中求胜：从混乱到规范，让项目部署不再手忙脚乱">
                        <span class="hidden-mobile">稳中求胜：从混乱到规范，让项目部署不再手忙脚乱</span>
                        <span class="visible-mobile">下一篇</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            <!-- 文章页 - 评论上方 -->

  
  
    <article id="comments">
      
  <div id="valine"></div>
  <script type="text/javascript">
    Fluid.utils.loadComments('#valine', function() {
      Fluid.utils.createScript('https://cdn.jsdelivr.net/gh/HCLonely/Valine@latest/dist/Valine.min.js', function() {
        var options = Object.assign(
          {"appId":"T1hUHH9Ks1ggG9DBE3HgUPpV-gzGzoHsz","appKey":"XFkgzzvzNo3J3uNCbBiSOFKc","path":"window.location.pathname","placeholder":"填取QQ号和邮箱后评论，支持读取头像及消息提醒，留下点什么叭... ᶘ ᵒᴥᵒᶅ","avatar":"Gravatar","meta":["nick","mail","link"],"requiredFields":[],"pageSize":10,"lang":"zh-CN","highlight":true,"recordIP":false,"serverURLs":"https://t1huhh9k.lc-cn-n1-shared.com","emojiCDN":null,"emojiMaps":null,"enableQQ":true,"master":"8c9b6d6637904da62d74d019cc6982de","friends":"0188229a9cfc284176ea9135cb9514cc","visitor":true},
          {
            el: "#valine",
            path: window.location.pathname,
            app_id: "",
            app_key: "",
            placeholder: "填取QQ号和邮箱后评论，支持读取头像及消息提醒，留下点什么叭... ᶘ ᵒᴥᵒᶅ",
            avatar: "Gravatar",
            meta: ["nick","mail","link"],
            pageSize: "10",
            lang: "zh-CN",
            highlight: true,
            recordIP: false,
            serverURLs: "https://t1huhh9k.lc-cn-n1-shared.com",

            // 设置Bilibili表情包地址
            emojiCDN: '//i0.hdslb.com/bfs/emote/', 
            // 表情title和图片映射
            emojiMaps: {
                "tv_白眼": "48f75163437445665a9be80bb316e4cb252c5415.gif@48w_48h.webp",
                "tv_doge": "302d6c88c63ed162c81a49cafe7ed2709e6fb955.gif@48w_48h.webp",
                "tv_坏笑": "5d2572efd09aab5dde9e2a198bb3f9ac1e2a982e.gif@48w_48h.webp",
                "tv_难过": "9c6b41008a67755410f712334c64313df5f91b3f.gif@48w_48h.webp",
                "tv_生气": "1902a5a2df5b5c931d88c12f0feb264b1e109d0d.gif@48w_48h.webp",
                "tv_委屈": "af5a5853edb43a8178a8cb5df707fa5e88143699.gif@48w_48h.webp",
                "tv_斜眼笑": "c66568b471192ca1f62f6ed4384dc1b283ab7508.gif@48w_48h.webp",
                "tv_呆": "d3fa91e4db9215eb1e20ab9da44f1214aa4bda7b.gif@48w_48h.webp",
                "tv_发怒": "3959eb81b952e4fa8d269d98f9e3639172d84073.gif@48w_48h.webp",
                "tv_呕吐": "db58e9442aae26694af18cc1683607cca3a16763.gif@48w_48h.webp",
                "tv_思考": "b63f9146bfd985af014f8d6d4bdb498805be48f9.gif@48w_48h.webp",
                "tv_微笑": "b98656855d782f61cb8edc7f7fca6563ecafff7e.gif@48w_48h.webp",
                "tv_疑问": "fce1b1a0f3b0e39a2dc16a18508dba7b91e929f4.gif@48w_48h.webp",
                "tv_大哭": "cba61f05f3039b02a7ffc0dfcd9d7995df9fdd74.gif@48w_48h.webp",
                "tv_鼓掌": "be106e6b265883a9f28fbe10f7b765701e2618d4.gif@48w_48h.webp",
                "tv_抠鼻": "696d9f93e722144dc2a78aeffc569418fdf3d565.gif@48w_48h.webp",
                "tv_亲亲": "3534ea44ab74bd20352b88c245a06c4b4c46d271.gif@48w_48h.webp",
                "tv_调皮": "fcd967395fd14e4dd5829fa7e8a967ce23205e52.gif@48w_48h.webp",
                "tv_笑哭": "1c2fd1e8c9dde12812f86e5d4cbddd8993d98082.gif@48w_48h.webp",
                "tv_晕": "030040ec5c9ddc9e3d067658c4139e7314ab42f8.gif@48w_48h.webp",
                "tv_点赞": "30ecff401245fb56bcc1cf588d1809ac1ab1607c.gif@48w_48h.webp",
                "tv_害羞": "411a3e459e8580f5bfd9f639a408247c4b509935.gif@48w_48h.webp",
                "tv_睡着": "3c8b5e293261287a6203597e29b3de07df4d18c6.gif@48w_48h.webp",
                "tv_色": "a0c6d99ab0ab63b8648f5283ff72cec04b604828.gif@48w_48h.webp",
                "tv_吐血": "e17e4539e169d14a3389ff147afea760cebe5de5.gif@48w_48h.webp",
                "tv_无奈": "eb4cb5f07cfd177c7e6a7914316717e56d9cc1d0.gif@48w_48h.webp",
                "tv_再见": "344f61609ecce2008520dc8a977b6169215748a9.gif@48w_48h.webp",
                "tv_流汗": "390bccec65eaff536bd5bb2a0c5b8b0bdea47334.gif@48w_48h.webp",
                "tv_偷笑": "7f11e6f7f63e79112b833bd41fa13a83d7cd8474.gif@48w_48h.webp",
                "tv_抓狂":"a476b93ecd8e94ac3257323fd822f91cef212de2.gif@48w_48h.webp",
                "tv_黑人问号":"b609adf664be33224a9923262031165ae3e34cd2.gif@48w_48h.webp",
                "tv_困":"91c2bf34ecf842d7016c01d841db3d4074bd281f.gif@48w_48h.webp",
                "tv_打脸":"b0fad4856e59c1240e448437da3287bb5ce547e5.gif@48w_48h.webp",
                "tv_闭嘴":"a3fc5388b09e945be3f18fe23bfed5874a0285b7.gif@48w_48h.webp",
                "tv_鄙视":"293b5d459e6264ecf314d20937a936fa672ccd1e.gif@48w_48h.webp",
                "tv_腼腆":"30984e8264324f901d19bea85dada7103b695534.gif@48w_48h.webp",
                "tv_馋":"2525c5703c594e5f0752f68db8948773caebde47.gif@48w_48h.webp",
                "tv_可爱":"f92d20f76258bc5f33fc9d7c5e2a1d41fef19a7c.gif@48w_48h.webp",
                "tv_发财":"76131e52c9b033681b4c896c6024d29ef7ec7ec2.gif@48w_48h.webp",
                "tv_生病":"beb94829fe04f1a41bd6ca611e1f6ca9ca169afa.gif@48w_48h.webp",
                "tv_流鼻血":"8ef473f74a849420da712487b2f56ecca1f695f5.gif@48w_48h.webp",
                "tv_尴尬":"e0b84ef5ee3e5b8978e584c7c5a6550c51d15f84.gif@48w_48h.webp",
                "tv_大佬":"14ca0c05382b8741940942b2430b7a8d55c02f7e.gif@48w_48h.webp",
                "tv_流泪":"7e71cde7858f0cd50d74b0264aa26db612a8a167.png@48w_48h.webp",
                "tv_冷漠":"b9cbc755c2b3ee43be07ca13de84e5b699a3f101.png@48w_48h.webp",
                "tv_皱眉":"72ccad6679fea0d14cce648b4d818e09b8ffea2d.png@48w_48h.webp",
                "tv_鬼脸":"0ffbbddf8a94d124ca2f54b360bbc04feb6bbfea.png@48w_48h.webp",
                "tv_调侃":"4bc022533ef31544ca0d72c12c808cf4a1cce3e3.png@48w_48h.webp",
                "tv_目瞪口呆":"0b8cb81a68de5d5365212c99375e7ace3e7891b7.png@48w_48h.webp",
            },

            master: "8c9b6d6637904da62d74d019cc6982de",
            friends: "0188229a9cfc284176ea9135cb9514cc",
            tagMeta: ["博主","友人","访客"],
            visitor: true // 阅读量统计
          }
        )
        new Valine(options);
        Fluid.utils.waitElementVisible('#valine .vcontent', () => {
          var imgSelector = '#valine .vcontent img:not(.vemoji)';
          Fluid.plugins.imageCaption(imgSelector);
          Fluid.plugins.fancyBox(imgSelector);
        })
      });
    });
  </script>
  <noscript>Please enable JavaScript to view the comments</noscript>


    </article>
  


          </article>
        </div>
      </div>
    </div>

    <div class="side-col d-none d-lg-block col-lg-2">
      <!-- 文章页面 - 右侧目录 -->

  <aside class="sidebar" style="margin-left: -1rem">
    <!-- 文章页面 - 右侧目录上方 -->
<div id="toc">
  <p class="toc-header">
    <i class="iconfont icon-list"></i>
    <span>目录</span>
  </p>
  <div class="toc-body" id="toc-body"></div>
</div>



  </aside>



    </div>
  </div>
</div>





  



  



  



  



  







    

    
      <a id="scroll-top-button" aria-label="TOP" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <!-- 博客 - 搜索框 -->
<div
  class="modal fade"
  id="modalSearch"
  tabindex="-1"
  role="dialog"
  aria-labelledby="ModalLabel"
  aria-hidden="true"
>
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">
          搜索
        </h4>
        <button
          type="button"
          id="local-search-close"
          class="close"
          data-dismiss="modal"
          aria-label="Close"
        >
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input
            type="text"
            id="local-search-input"
            class="form-control validate"
          />
          <label data-error="x" data-success="v" for="local-search-input"
            >关键词</label
          >
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>

    

    
        <div class="modal fade" id="modalNotice" tabindex="-1" role="dialog" aria-hidden="true"
     style="font-family: 'Ma Shan Zheng', cursive; color: #ffffff;">
    <div class="modal-dialog modal-dialog-scrollable" role="document"
         style="font-family: 'Ma Shan Zheng', cursive;">
        <div class="modal-content" style="border-radius: 6px;">
            <!-- 公告头部 - 响应式设计 -->
            <div class="modal-header text-center"
                 style="padding: 1rem 1.5rem;border-bottom: 1px solid rgba(255,255,255,0.2)">
                <h4 class="modal-title w-100 font-weight-bold"
                    style="font-family: 'Microsoft YaHei', sans-serif;letter-spacing: 1px;text-shadow: 1px 1px 2px rgba(0,0,0,0.2);color: #ffffff;
                           font-size: 1.5rem; /* 默认PC端大小 */
                           /* 移动端适配 */
                           @media (max-width: 768px) {
                               font-size: 1.2rem;
                           }">
                    <div class="notice-title">
                        <i class="fas fa-bullhorn mr-2"> 围栏告示</i>
                    </div>
                    <small style="display: block; font-family: 'STKaiti', serif; font-size: 0.6em; color: #a0a0a0; margin-top: 3px;">
                        旧梦轻拾 · 谨识
                    </small>
                </h4>
            </div>

            <!-- 公告内容区 - 响应式设计 -->
            <div class="modal-body"
                 style="padding: 2rem; /* PC端 */
                        max-height: 70vh;
                        overflow-y: auto;
                        /* 移动端适配 */
                        @media (max-width: 768px) {
                            padding: 1rem;
                            max-height: 60vh;
                        }">
                <!-- 图片容器（响应式设计） -->
                <!--                <div class="announcement-hero"-->
                <!--                     style="margin-bottom: 2rem; /* PC端 */-->
                <!--                            /* 移动端适配 */-->
                <!--                            @media (max-width: 768px) {-->
                <!--                                margin-bottom: 1rem;-->
                <!--                            }">-->
                <!--                    <img src="http://blog.memory-life.icu/%E3%80%90%E5%93%B2%E9%A3%8E%E5%A3%81%E7%BA%B8%E3%80%91%E5%8A%A8%E6%BC%AB-%E5%A4%95%E9%98%B3%E9%93%81%E8%BD%A8.jpg"-->
                <!--                         alt="时光溯洄题图"-->
                <!--                         style="width: 100%; -->
                <!--                                max-height: 400px; /* PC端 */-->
                <!--                                object-fit: cover;-->
                <!--                                border-radius: 4px; -->
                <!--                                box-shadow: 0 2px 12px rgba(0,0,0,0.1);-->
                <!--                                /* 移动端适配 */-->
                <!--                                @media (max-width: 768px) {-->
                <!--                                    max-height: 30vh;-->
                <!--                                }"-->
                <!--                         loading="lazy">-->
                <!--                </div>-->

                <!-- 静态公告列表 - 响应式设计 -->
                <div class="announcement-list">
                    <div class="announcement-item"
                         style="margin-bottom: 2rem; /* PC端 */
                                padding: 2rem;
                                background: rgba(255,255,255,0.05);
                                border-radius: 8px;
                                /* 移动端适配 */
                                @media (max-width: 768px) {
                                    margin-bottom: 1rem;
                                    padding: 1rem;
                                }">
                        <h2 style="color: #d38532;
                                  font-weight: 600;
                                  font-size: 1.5rem; /* PC端 */
                                  margin-bottom: 1.2rem;
                                  letter-spacing: 0.5px;
                                  /* 移动端适配 */
                                  @media (max-width: 768px) {
                                      font-size: 1.2rem;
                                      margin-bottom: 1rem;
                                  }">
                            <i class="fas fa-calendar-check mr-2"></i>时光溯洄
                            <small style="display: block; font-size: 0.6em; color: #b8b8b8;text-align: right;">——
                                晨昏往事</small>
                        </h2>
                        <div style="color: #e0e0e0;
                                  line-height: 1.8; /* PC端 */
                                  font-size: 1.05rem;
                                  letter-spacing: 0.3px;
                                  /* 移动端适配 */
                                  @media (max-width: 768px) {
                                      line-height: 1.6;
                                      font-size: 0.95rem;
                                  }">
                            <!-- 内容保持不变 -->
                            <p style="margin-bottom: 1rem; text-indent: 2em;">你好。</p>
                            <!-- 其余段落内容... -->
                            <p style="margin-bottom: 1rem; text-indent: 2em;">
                                建站后的第813天，在百忙之中总算又能抽出时间来，对整个博客站点功能做整体的规划及优化完善。</p>
                            <p style="margin-bottom: 1rem; text-indent: 2em;">
                                在刚刚过去的几年时间里，往事皆以笔墨挥毫于时光素笺之上，数百天如一日，故事的书写从未间断过。</p>
                            <p style="margin-bottom: 1rem; text-indent: 2em; font-style: italic; color: #b8b8b8;">
                                时光悠悠，日月如流，过往的蹉跎岁月总在不经意间在心间回眸。</p>
                            <p style="margin-bottom: 1rem; text-indent: 2em; font-weight: 500; color: #ffffff;">
                                俯仰之间，轻舟已过万重山。</p>
                            <p style="margin-bottom: 1rem; text-indent: 2em; font-weight: 500; color: #ffffff;">
                                蹉跎之处，往事皆成云烟散。</p>
                            <p style="margin-bottom: 1rem; text-indent: 2em;">
                                这几年的时光过得太快了，好像过去这段岁月里的所有事情都发生在一瞬间。</p>
                            <p style="margin-bottom: 1rem; text-indent: 2em;">
                                这几年的时光同样太久了，久到那些时日里仿佛囊括了自己的整个前半生。</p>
                            <p style="margin-bottom: 0; text-align: right; font-size: 0.95rem; color: #a0a0a0;">——
                                八百余个昼夜，当时只道是地久天长，如今回望，不过浮光掠影间的一瞬。</p>
                        </div>
                    </div>

                    <!-- 第二个公告项 - 响应式设计 -->
                    <div class="announcement-item"
                         style="margin-bottom: 2rem; /* PC端 */
                                padding: 2rem;
                                background: rgba(255,255,255,0.05);
                                border-radius: 8px;
                                /* 移动端适配 */
                                @media (max-width: 768px) {
                                    margin-bottom: 1rem;
                                    padding: 1rem;
                                }">
                        <h2 style="color: #6cc70b;
                                  font-weight: 600;
                                  font-size: 1.5rem; /* PC端 */
                                  margin-bottom: 1.2rem;
                                  letter-spacing: 0.5px;
                                  /* 移动端适配 */
                                  @media (max-width: 768px) {
                                      font-size: 1.2rem;
                                      margin-bottom: 1rem;
                                  }">
                            <i class="fas fa-book-open mr-2"></i>墨痕新注
                            <small style="display: block; font-size: 0.6em; color: #b8b8b8;text-align: right;">——
                                待起之章</small>
                        </h2>
                        <div style="color: #e0e0e0;
                                  line-height: 1.8; /* PC端 */
                                  font-size: 1.05rem;
                                  letter-spacing: 0.3px;
                                  /* 移动端适配 */
                                  @media (max-width: 768px) {
                                      line-height: 1.6;
                                      font-size: 0.95rem;
                                  }">
                            <!-- 列表内容 - 响应式设计 -->
                            <ul style="padding-left: 1.8rem; /* PC端 */
                                      margin-bottom: 1.5rem;
                                      /* 移动端适配 */
                                      @media (max-width: 768px) {
                                          padding-left: 1.5rem;
                                          margin-bottom: 1.2rem;
                                      }">
                                <li style="margin-bottom: 0.8rem; /* PC端 */
                                         position: relative;
                                         list-style-type: none;
                                         /* 移动端适配 */
                                         @media (max-width: 768px) {
                                             margin-bottom: 0.6rem;
                                         }">
                                    <span style="position: absolute;
                                               left: -1.8rem; /* PC端 */
                                               color: #6cc70b;
                                               /* 移动端适配 */
                                               @media (max-width: 768px) {
                                                   left: -1.5rem;
                                               }">◆</span>
                                    <span style="font-weight: bolder;">溯源计划：</span>新增博文"溯源计划"，旨在用先进的数字技术留住过去的旧时光，让家族的记忆在数字云端生长发芽，全站博文数量已达90+。
                                </li>
                                <li style="margin-bottom: 0.8rem; /* PC端 */
                                         position: relative;
                                         list-style-type: none;
                                         /* 移动端适配 */
                                         @media (max-width: 768px) {
                                             margin-bottom: 0.6rem;
                                         }">
                                    <span style="position: absolute;
                                               left: -1.8rem; /* PC端 */
                                               color: #6cc70b;
                                               /* 移动端适配 */
                                               @media (max-width: 768px) {
                                                   left: -1.5rem;
                                               }">◆</span>
                                    <span style="font-weight: bolder;">围栏告示：</span>自去年夏天站点新增了“评论回复”功能后，至今时隔十余月，在芒种前夕本站久违地上线“围栏告示”功能，本公告栏会不定时更新，持续跟进记录最新站点功能调整日志，更多精彩内容请敬请期待。
                                </li>
                                <li style="margin-bottom: 0.8rem; /* PC端 */
                                         position: relative;
                                         list-style-type: none;
                                         /* 移动端适配 */
                                         @media (max-width: 768px) {
                                             margin-bottom: 0.6rem;
                                         }">
                                    <span style="position: absolute;
                                               left: -1.8rem; /* PC端 */
                                               color: #6cc70b;
                                               /* 移动端适配 */
                                               @media (max-width: 768px) {
                                                   left: -1.5rem;
                                               }">◆</span>
                                    <span style="font-weight: bolder;">图片查看：</span>最近几周时间里，考虑到图文流量费用收取问题，暂时关闭了七牛云对象存储私有空间访问权限，故博文内的图文无法正常预览，择日考虑开启访问权限。
                                </li>
                                <li style="margin-bottom: 0.8rem; /* PC端 */
                                         position: relative;
                                         list-style-type: none;
                                         /* 移动端适配 */
                                         @media (max-width: 768px) {
                                             margin-bottom: 0.6rem;
                                         }">
                                    <span style="position: absolute;
                                               left: -1.8rem; /* PC端 */
                                               color: #6cc70b;
                                               /* 移动端适配 */
                                               @media (max-width: 768px) {
                                                   left: -1.5rem;
                                               }">◆</span>
                                    <span style="font-weight: bolder;">壁纸下载：</span>后续计划实现壁纸下载功能，均为个人收集的共150+超高分辨率精美壁纸，提供在线预览以及下载功能。
                                </li>
                                <li style="margin-bottom: 0.8rem; /* PC端 */
                                         position: relative;
                                         list-style-type: none;
                                         /* 移动端适配 */
                                         @media (max-width: 768px) {
                                             margin-bottom: 0.6rem;
                                         }">
                                    <span style="position: absolute;
                                               left: -1.8rem; /* PC端 */
                                               color: #6cc70b;
                                               /* 移动端适配 */
                                               @media (max-width: 768px) {
                                                   left: -1.5rem;
                                               }">◆</span>
                                    <span style="font-weight: bolder;">阅读体验：</span>规划完善文章内分页功能，并提供“最近更新”的文章列表，计划收录更新率较高的文章，譬如：阳台日记、叙事之外、岁月如歌、游戏人生等等，尽可能多的提升在线浏览和阅读体验。
                                </li>
                                <li style="margin-bottom: 0.8rem; /* PC端 */
                                         position: relative;
                                         list-style-type: none;
                                         /* 移动端适配 */
                                         @media (max-width: 768px) {
                                             margin-bottom: 0.6rem;
                                         }">
                                    <span style="position: absolute;
                                               left: -1.8rem; /* PC端 */
                                               color: #6cc70b;
                                               /* 移动端适配 */
                                               @media (max-width: 768px) {
                                                   left: -1.5rem;
                                               }">◆</span>
                                    <span style="font-weight: bolder;">友链完善：</span>持续优化完善友链页面，整理归档个人常用的高质量网站合集，无偿分享给有缘人。
                                </li>
                                <li style="margin-bottom: 0.8rem; /* PC端 */
                                         position: relative;
                                         list-style-type: none;
                                         /* 移动端适配 */
                                         @media (max-width: 768px) {
                                             margin-bottom: 0.6rem;
                                         }">
                                    <span style="position: absolute;
                                               left: -1.8rem; /* PC端 */
                                               color: #6cc70b;
                                               /* 移动端适配 */
                                               @media (max-width: 768px) {
                                                   left: -1.5rem;
                                               }">◆</span>
                                    <span style="font-weight: bolder;">音乐餐厅：</span>历经十余小时不间断调研和尝试，本站成功上线”音乐餐厅”功能，目前仅收录了个人在QQ音乐平台积累的两份歌单，再匆忙也要记得点播一首喜欢的音乐，没有音乐熏陶的心灵终究是充满缺憾的。
                                </li>
                                <li style="margin-bottom: 0.8rem; /* PC端 */
                                         position: relative;
                                         list-style-type: none;
                                         /* 移动端适配 */
                                         @media (max-width: 768px) {
                                             margin-bottom: 0.6rem;
                                         }">
                                    <span style="position: absolute;
                                               left: -1.8rem; /* PC端 */
                                               color: #6cc70b;
                                               /* 移动端适配 */
                                               @media (max-width: 768px) {
                                                   left: -1.5rem;
                                               }">◆</span>
                                    <span style="font-weight: bolder;">三言两语：</span>每张照片都是时光的便签，随手一贴就记下了那天，本站结合Mamos实现并注入留言板功能，随缘记录那些藏在照片背后的故事。
                                </li>
                                <li style="margin-bottom: 0.8rem; /* PC端 */
                                         position: relative;
                                         list-style-type: none;
                                         /* 移动端适配 */
                                         @media (max-width: 768px) {
                                             margin-bottom: 0.6rem;
                                         }">
                                    <span style="position: absolute;
                                               left: -1.8rem; /* PC端 */
                                               color: #6cc70b;
                                               /* 移动端适配 */
                                               @media (max-width: 768px) {
                                                   left: -1.5rem;
                                               }">◆</span>
                                    <span style="font-weight: bolder;">旧梦轻拾：</span>更新全站博客文章所属分类，共设有代码锋芒、部署之道、旧梦轻拾、人间片刻等十余种分类。
                                </li>
                                <li style="margin-bottom: 0.8rem; /* PC端 */
                                         position: relative;
                                         list-style-type: none;
                                         /* 移动端适配 */
                                         @media (max-width: 768px) {
                                             margin-bottom: 0.6rem;
                                         }">
                                    <span style="position: absolute;
                                               left: -1.8rem; /* PC端 */
                                               color: #6cc70b;
                                               /* 移动端适配 */
                                               @media (max-width: 768px) {
                                                   left: -1.5rem;
                                               }">◆</span>
                                    <span style="font-weight: bolder;">方寸之间：</span>博客应用版发布，更便捷的阅读体验来了！现已正式推出独立的桌面应用程序与移动端应用程序，暂时通过网盘和代码库提供安装包。
                                </li>
                                <p style="margin-bottom: 0; text-align: right; font-size: 0.9rem; color: #8a8a8a;">
                                    此公告最后更新于：<span style="color: #6cc70b;">2025/09/30晚</span>
                                </p>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 公告页脚 - 响应式设计 -->
            <div class="modal-footer"
                 style="border-top: 1px solid rgba(255,255,255,0.2);
                        padding: 1rem 1.5rem; /* PC端 */
                        justify-content: space-between;
                        /* 移动端适配 */
                        @media (max-width: 768px) {
                            padding: 0.8rem;
                        }">
                <small style="color: #ffffff;
                            font-size: 0.9rem; /* PC端 */
                            /* 移动端适配 */
                            @media (max-width: 768px) {
                                font-size: 0.8rem;
                            }">
                    <i class="iconfont icon-pen"></i>
                    <i class="fas fa-info-circle mr-1"></i>芒种前夕 · 旅途第813天
                    · 2025/05/28
                </small>
                <button id="confirm-btn" type="button" class="btn btn-sm" data-dismiss="modal"
                        style="background: #a0a0a0;
                               color: #ffffff;
                               border-radius: 4px;
                               padding: 0.5rem 1.2rem; /* PC端 */
                               border: none;
                               font-size: 0.9rem;
                               /* 移动端适配 */
                               @media (max-width: 768px) {
                                   padding: 0.3rem 0.8rem;
                                   font-size: 0.85rem;
                               }">
                    <i class="fas fa-check mr-1" style="color: #ffffff;">心已阅</i>
                </button>
            </div>
        </div>
    </div>
</div>

<style>
  .notice-title {
    display: flex;
    align-items: center;
    white-space: nowrap;
  }

  .notice-title:before,
  .notice-title:after {
    content: "";
    flex: 1;
    height: 1px;
    background: #ddd; /* 横线颜色 */
    margin: 0 10px; /* 横线与文字的间距 */
  }
</style>


<style>
  /* 响应式模态框宽度 */
  @media (min-width: 992px) {
    #modalNotice .modal-dialog {
      max-width: 800px;
    }
  }

  @media (max-width: 991px) {
    #modalNotice .modal-dialog {
      margin: 0.5rem auto;
    }
  }
</style>

<script>
  // 页面加载完成后执行
  document.addEventListener('DOMContentLoaded', function () {
    // 检查是否首次访问
    if (!localStorage.getItem('hasShownPopup')) {
      // 动态加载notice.ejs内容
      fetch('_partials/notice.ejs')  // 替换为实际路径
        .then(response => response.text())
        .then(html => {
          // 插入到页面body末尾
          document.body.insertAdjacentHTML('beforeend', html);

          // 手动初始化Bootstrap模态框
          $('#modalNotice').modal('show');

          // 标记为已显示
          localStorage.setItem('hasShownPopup', 'true');

          // 监听关闭事件
          $('#modalNotice').on('hidden.bs.modal', function () {
            // 可选的后续处理
          });
        })
        .catch(error => {
          console.error('加载公告栏失败:', error);
          // 备用方案：显示简单弹窗
          const fallbackHTML = `
                <div class="modal-backdrop" style="/* 样式 */">
                    <div class="modal-content">/* 内容 */</div>
                </div>`;
          document.body.insertAdjacentHTML('beforeend', fallbackHTML);
        });
    }
  });
</script>

    

    
  </main>

  <footer>
    <!-- 博客 - 页脚 -->
<div class="footer-inner">
  
    <div class="footer-content">
       <a href="https://hexo.fluid-dev.com/docs/guide/" target="_blank" rel="nofollow noopener"> <span>Memory | 个人文档站点</span> </a>
<i class="iconfont icon-love"></i> <a href="https://hexo.fluid-dev.com/docs/guide/" target="_blank" rel="nofollow noopener"> <span>配置指南 | Hexo Fluid 用户手册</span> </a> 
    </div>
  

  

  
    <!-- 备案信 ICP for China -->
    <div class="beian">
  <span>
    <a href="http://beian.miit.gov.cn/" target="_blank" rel="nofollow noopener">
      京ICP证123456号
    </a>
  </span>
  
    
      <span>
        <a
          href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=12345678"
          rel="nofollow noopener"
          class="beian-police"
          target="_blank"
        >
          
            <span style="visibility: hidden; width: 0">|</span>
            <img src="/blog/img/police_beian.png" alt="police-icon"/>
          
          <span>京公网安备12345678号</span>
        </a>
      </span>
    
  
</div>

  

  

</div>

<!-- 评论框美化 -->
<style>
    #comments .veditor{
        min-height: 20vh;
        background-image: url(http://blog.memory-life.icu/pathway0716.jpg);
        background-size: contain;
        background-repeat: no-repeat;
        background-position: right;
        background-color: rgba(255,255,255,0);
        resize: none;}
</style>

<script>
    //   自定义邮箱审核规则
    document.body.addEventListener('click', function(e) {
        if (e.target.classList.contains('vsubmit')) {
            const email = document.querySelector('input[type=email]');
            const nick = document.querySelector('input[name=nick]');
            const reg = /^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;
            if (!email.value || !nick.value || !reg.test(email.value)) {
                const str = `<div class="valert text-center"><div class="vtext">请填写正确的昵称和邮箱！</div></div>`;
                const vmark = document.querySelector('.vmark');
                vmark.innerHTML = str;
                vmark.style.display = 'block';
                setTimeout(function() {
                    vmark.style.display = 'none';
                    vmark.innerHTML = '';
                }, 2500);
            }
        }
    })
</script>



  </footer>

  <!-- Scripts -->
  
  <script  src="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":false,"trickleSpeed":100})
    NProgress.start()
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://lib.baomitu.com/jquery/3.6.0/jquery.min.js" ></script>
<script  src="https://lib.baomitu.com/twitter-bootstrap/4.6.1/js/bootstrap.min.js" ></script>
<script  src="/blog/js/events.js" ></script>
<script  src="/blog/js/plugins.js" ></script>


  <script  src="https://lib.baomitu.com/typed.js/2.0.12/typed.min.js" ></script>
  <script>
    (function (window, document) {
      var typing = Fluid.plugins.typing;
      var subtitle = document.getElementById('subtitle');
      if (!subtitle || !typing) {
        return;
      }
      var text = subtitle.getAttribute('data-typed-text');
      
        typing(text);
      
    })(window, document);
  </script>







  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/tocbot/4.18.2/tocbot.min.js', function() {
    var toc = jQuery('#toc');
    if (toc.length === 0 || !window.tocbot) { return; }
    var boardCtn = jQuery('#board-ctn');
    var boardTop = boardCtn.offset().top;

    window.tocbot.init(Object.assign({
      tocSelector     : '#toc-body',
      contentSelector : '.markdown-body',
      linkClass       : 'tocbot-link',
      activeLinkClass : 'tocbot-active-link',
      listClass       : 'tocbot-list',
      isCollapsedClass: 'tocbot-is-collapsed',
      collapsibleClass: 'tocbot-is-collapsible',
      scrollSmooth    : true,
      includeTitleTags: true,
      headingsOffset  : -boardTop,
    }, CONFIG.toc));
    if (toc.find('.toc-list-item').length > 0) {
      toc.css('visibility', 'visible');
    }

    Fluid.events.registerRefreshCallback(function() {
      if ('tocbot' in window) {
        tocbot.refresh();
        var toc = jQuery('#toc');
        if (toc.length === 0 || !tocbot) {
          return;
        }
        if (toc.find('.toc-list-item').length > 0) {
          toc.css('visibility', 'visible');
        }
      }
    });
  });
</script>


  <script src=https://lib.baomitu.com/clipboard.js/2.0.11/clipboard.min.js></script>

  <script>Fluid.plugins.codeWidget();</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/anchor-js/4.3.1/anchor.min.js', function() {
    window.anchors.options = {
      placement: CONFIG.anchorjs.placement,
      visible  : CONFIG.anchorjs.visible
    };
    if (CONFIG.anchorjs.icon) {
      window.anchors.options.icon = CONFIG.anchorjs.icon;
    }
    var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
    var res = [];
    for (var item of el) {
      res.push('.markdown-body > ' + item.trim());
    }
    if (CONFIG.anchorjs.placement === 'left') {
      window.anchors.options.class = 'anchorjs-link-left';
    }
    window.anchors.add(res.join(', '));

    Fluid.events.registerRefreshCallback(function() {
      if ('anchors' in window) {
        anchors.removeAll();
        var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
        var res = [];
        for (var item of el) {
          res.push('.markdown-body > ' + item.trim());
        }
        if (CONFIG.anchorjs.placement === 'left') {
          anchors.options.class = 'anchorjs-link-left';
        }
        anchors.add(res.join(', '));
      }
    });
  });
</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.js', function() {
    Fluid.plugins.fancyBox();
  });
</script>


  <script>Fluid.plugins.imageCaption();</script>

  <script  src="/blog/js/local-search.js" ></script>

  <script defer src="/blog/js/leancloud.js" ></script>




    
<script src="https://cdn.jsdelivr.net/npm/aplayer@1.10.1/dist/APlayer.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/meting@2/dist/Meting.min.js"></script>



<!-- 主题的启动项，将它保持在最底部 -->
<!-- the boot of the theme, keep it at the bottom -->
<script  src="/blog/js/boot.js" ></script>


  

  <noscript>
    <div class="noscript-warning">博客在允许 JavaScript 运行的环境下浏览效果更佳</div>
  </noscript>
</body>
</html>
